package io.geekidea.springbootplus.system.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.geekidea.springbootplus.system.entity.SysSubscribe;
import io.geekidea.springbootplus.system.param.SysSubscribePageParam;
import io.geekidea.springbootplus.system.param.sysuser.SysUserPageParam;
import io.geekidea.springbootplus.system.vo.SysSubscribeQueryVo;
import io.geekidea.springbootplus.system.vo.SysUserQueryVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.List;

@Repository
public interface SysSubscribeMapper extends BaseMapper<SysSubscribe> {
    //将商品加入预约表中
    Integer insertSubscribe(SysSubscribe sysSubscribe);
    //从预约表中将商品单个删除
    Integer deleteSubscribe(Integer id);
    //从预约表中将商品批量删除
    Integer deleteAllFromSubscribe(List<Integer> ids);
    //根据商品编号改变预约表中商品
    Integer updateSubscribeById(SysSubscribe sysSubscribe);
    //根据手机号分页获取预约人数据
    List<SysSubscribeQueryVo> selectSysSubscribeByPhoneNum(SysSubscribePageParam subscribe);
    //分页查询
    IPage<SysSubscribeQueryVo> getSysSubscribePageList(@Param("page") Page page, @Param("param") SysSubscribePageParam sysSubscribePageParam);
    //根据id获取预约表详细信息
    SysSubscribeQueryVo getSubscribe(Serializable id);
}
